<template>
  <el-select>
    <el-option v-for="item in finalOptions" :key="item.value" :="item" />
  </el-select>
</template>
<script setup>
import { CONST_VALUE } from '@/utils/const';
import { computed } from 'vue';

const props = defineProps(['options', 'constKey']);
const finalOptions = computed(() => {
  let options = props.options;
  if (props.constKey) {
    options = CONST_VALUE[props.constKey];
  }
  if (Array.isArray(options)) {
    return options;
  }
  return [];
});
</script>
